import request from '@/utils/request'

// 查询工期列表
export function listPeriod(query) {
  return request({
    url: '/project/period/list',
    method: 'get',
    params: query
  })
}

// 查询标段开始日期，截止日期，业务上报日
export function getInstitutionDetail(data) {
  return request({
    url: '/project/period/getInstitutionDetail',
    method: 'post',
    params: data
  })
}

// 查询工期详细
export function getPeriod(periodId) {
  return request({
    url: '/project/period/' + periodId,
    method: 'get'
  })
}

// 生成工期
export function genPeriod(data) {
  return request({
    url: '/project/period/gen',
    method: 'post',
    params: data
  })
}

// 新增工期
export function addPeriod(data) {
  return request({
    url: '/project/period',
    method: 'post',
    params: data
  })
}

// 修改工期
export function updatePeriod(data) {
  return request({
    url: '/project/period',
    method: 'put',
    data: data
  })
}

// 删除工期
export function delPeriod(data) {
  return request({
    url: '/project/period',
    method: 'delete',
    params: data
  })
}

// 导出工期
export function exportPeriod(query) {
  return request({
    url: '/project/period/export',
    method: 'get',
    params: query
  })
}

// 查询标段工期集合
export function selectPeriodList(data) {
  return request({
    url: '/project/period/selectPeriodList',
    method: 'post',
    params: data
  })
}

// 查询标段工期集合--汇总功能使用
export function dropDownSummaryPeriodList(data) {
  return request({
    url: '/project/period/dropDownSummaryPeriodList',
    method: 'post',
    params: data
  })
}

// 查询标段工期集合--报表功能使用
export function dropDownReportPeriodList(data) {
  return request({
    url: '/project/period/dropDownReportPeriodList',
    method: 'post',
    params: data
  })
}

// 查询项目下所有标段去重工期集合--项目报表功能使用
export function dropDownProjectReportPeriodList(data) {
  return request({
    url: '/project/period/dropDownProjectReportPeriodList',
    method: 'post',
    params: data
  })
}
